﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace ERPStore.Tracking.Models
{
	[Serializable]
	[DataContract]
	public class VisitorHistory : IDisposable
	{
		public VisitorHistory()
		{
			CreationDate = DateTime.Now;
			TrackList = new List<Track>();
		}
		[DataMember]
		public Visitor Visitor { get; set; }
		[DataMember]
		public List<Track> TrackList { get; set; }
		[DataMember]
		public DateTime CreationDate { get; set; }

		#region IDisposable Members

		public void Dispose()
		{
			Visitor = null;
			if (TrackList != null)
			{
				TrackList.Clear();
			}
			TrackList = null;
		}

		#endregion
	}
}
